Skip to content

Add xt_comment and nf_tables kernel modules for k3s support#9

Open
kvinwang wants to merge 1 commit intomainfrom
add-k3s-kernel-modules
Open

Add xt_comment and nf_tables kernel modules for k3s support#9
kvinwang wants to merge 1 commit intomainfrom
add-k3s-kernel-modules

Conversation

@kvinwang
Copy link
Collaborator

Summary

  • Enable nf_tables and sub-modules in kernel config (dstack-docker.cfg)
  • Include xt_comment and 12 nft_* module packages in all rootfs images
  • Also add xt_multiport, xt_statistic, xt_redirect, xt_tcpmss, xt_ct, xt_log, xt_limit for broader Kubernetes networking compatibility

Why

Running k3s inside a dstack CVM fails because:

  1. xt_comment.ko was compiled (CONFIG_NETFILTER_XT_MATCH_COMMENT=m) but not included in rootfs
  2. nf_tables was completely disabled

Without xt_comment, kube-proxy cannot create iptables rules with comment matches, breaking all ClusterIP service routing. This affects any Kubernetes distribution (k3s, k0s, kubeadm).

Mirror of Dstack-TEE/meta-dstack PRs #42 and #43.

…upport

Enable iptables comment match and nftables in the kernel config, and
include the corresponding module packages in all rootfs images.

These modules are required by Kubernetes kube-proxy (iptables mode)
and modern iptables-nft backend. Without xt_comment, kube-proxy cannot
create ClusterIP routing rules, breaking all pod networking.
@kvinwang kvinwang force-pushed the add-k3s-kernel-modules branch from 73defa8 to 50172d8 Compare March 17, 2026 02:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant